package com.learn.actionplatfo.service;

import com.learn.actionplatfo.Mapper.PriceMapper;
import com.learn.actionplatfo.bean.Price;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PriceService {
    @Autowired
    PriceMapper priceMapper;

    public int updatePrice(Price price){
        return priceMapper.updatePrice(price);
    }

    public int addPrice(Price price){return priceMapper.addPrice(price);}

    public Price getPriceByGoodId(int id){
        return priceMapper.getPriceByGoodId(id);
    }

    public int getPriceMaxId(){
        return priceMapper.getPriceMaxId();
    }
}
